package ai.attackControllers;

import com.jme.math.Vector3f;

import logic.common.player.Player;
import logic.nodes.TeamNode;
import logic.ships.hunter.Hunter;

public class MediumAttackController extends EasyAttackController {
	
	private static final long serialVersionUID = 1L;
	
	public MediumAttackController(Player bot) {
		super(bot);
	}
	
	@Override
	public void delayedUpdate(float time) {
		super.delayedUpdate(time);
		
		if(bot.getHunter().hasAttackingHeatSeeker()) bot.getHunter().useCounterMeasures();
	}
	
	@Override
	protected void fireWeapons(Hunter hunter, TeamNode target) {
		super.fireWeapons(hunter, target);
		
		Vector3f targetDirection = target.getLocalTranslation().subtract(hunter.getLocalTranslation());
		fireHeatSeeker(targetDirection);
	}
}